package top.cardone.core;

/**
 * @author yao hai tao
 */
@lombok.Getter
@lombok.Setter
@lombok.experimental.Accessors(chain = true)
public class CodeException extends RuntimeException {
    private Object[] args;
    /**
     * 代码
     */
    private String code;

    public CodeException() {
        this(null, null, null);
    }

    public CodeException(final String code, final Object[] args, final Throwable cause) {
        super(code, cause);
        this.code = code;
        this.args = args;
    }

    public CodeException(final String code) {
        this(code, null, null);
    }

    public CodeException(final String code, final Object... args) {
        this(code, args, null);
    }

    public CodeException(final String code, final Throwable cause) {
        this(code, null, cause);
    }
}
